import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * MyCat is your own cat. Get it to do things by writing code in its act method.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class MyCat extends Cat
{
    private boolean flag = true;
    /**
     * Act - do whatever the MyCat wants to do.
     */
    public void act()
    {
        if(flag == true) {
            walkLeft(700);
        } else {
            walkRight(700);
        }
        if(isAtEdge()) {
            flag = !flag;
            //turn(180);
        }
    }    
}
